/**
 * 公共基础接口封装
 */
import request from '@/utils/request'
import { ILoginResponse, IMenu } from './types/common'

export const Login = (data: {
   username: string
   password: string
 }) => {
  return request<ILoginResponse>({
    method: 'POST',
    url: '/login',
    data
  })
}

export const getMenu = () => {
  return request<IMenu>({
    method: 'GET',
    url: '/menus'
  })
}

export const logout = () => {
  return request({
    method: 'GET',
    url: '/setting/admin/logout'
  })
}
